<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="Tindex.css">
</head>

<body>
    <div id="app">
        <div class="header">
            <input type="text" placeholder="输入任务名称" v-model="taskcontent">
            <span @click="addTask">新增</span>
        </div>
        <div class="task_num">
            <div>全部任务({{taskArr.length}})</div>
            <div>已完成( {{taskArr.length-unFinishCount}} )</div>
            <div>未完成({{unFinishCount}})</div>
        </div>
        <div class="list">
            <div class="task_list">任务列表</div>
            <div :class="{ untask: item.status==false }" class="task" v-for="(item,index) in taskArr" :key="index">
                <div>
                    <span><input @click="taskStatus(item)" type="checkbox" :checked="item.status"></span>
                    <span>{{item.id}}</span>
                    <span>{{item.name}}</span>
                </div>

                <span @click="taskDeletet(index)">删除</span>
            </div>
            <div v-show="taskArr.length == 0" class="empty">你还没有添加任务，请去添加一个任务</div>
        </div>


    </div>




    <script src="vue-2.5.21.js"></script>
    <script src="Tindex.js"></script>
</body>

</html>